from libs.ping import ping

cmd = cmd.split(' ')
if len(cmd) == 1:
    print('''Ping usage:
    - ping host [count] [size] [timeout] - Ping host.''')

if len(cmd) == 2:
    ping(cmd[1], count=4, size=64, timeout=1000, quiet=False)

if len(cmd) == 3:
    ping(cmd[1], count=int(cmd[2]), size=64, timeout=1000, quiet=False)
    
if len(cmd) == 4:
    ping(cmd[1], count=int(cmd[2]), size=int(cmd[3]), timeout=1000, quiet=False)
    
if len(cmd) == 5:
    ping(cmd[1], count=int(cmd[2]), size=int(cmd[3]), timeout=int(cmd[4]), quiet=False)